import sqlalchemy as sa
from sqlalchemy.orm import Mapped, mapped_column

from src.infrastructure.db.models.base import Base


class BotSettings(Base):
    __tablename__ = "bot_settings"
    __mapper_args__ = {"eager_defaults": True}

    id: Mapped[int] = mapped_column(primary_key=True)
    order_archiving_status: Mapped[bool] = mapped_column(server_default=sa.False_())
    order_notify_status: Mapped[bool] = mapped_column(server_default=sa.False_())
    order_autorenew_status: Mapped[bool] = mapped_column(server_default=sa.False_())
    proxy_checker_status: Mapped[bool] = mapped_column(server_default=sa.False_())

    def __str__(self):
        return self.id

    def __repr__(self):
        return f"<Bot settings №{self.id}>"
